<form id="form_categoria" action="<?php echo url_for('categoria/' . ($form->getObject()->isNew() ? 'create' : 'update') . (!$form->getObject()->isNew() ? '?id_categoria=' . $form->getObject()->getIdCategoria() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
    <?php if (!$form->getObject()->isNew()): ?>
        <input type="hidden" name="sf_method" value="put" />
        <input type="hidden" name="id_categoria" value="<?php echo $form->getObject()->getIdCategoria() ?>" />
    <?php endif; ?>
    <?php echo $form->renderHiddenFields() ?>
        <table class="form">
    	<tbody>
    	<tr><th colspan="2" class="title">Dados da Categoria</th></tr>
	    <?php echo $form->renderGlobalErrors() ?>
	    <tr>
			<th><?php echo $form['descricao']->renderLabel() ?></th>
			<td>
			    <?php echo $form['descricao'] ?>
			    <?php echo form_error('categoria[descricao]'); ?>
			    <span id="erro_descricao"></span>
			</td>
	    </tr>
	    <tr>
			<th><?php echo $form['tipo']->renderLabel() ?></th>
			<td>
			    <?php echo $form['tipo'] ?>
			    <?php echo form_error('categoria[tipo]'); ?>
			</td>
	    </tr>
	</tbody>
    </table>
</form>